POV-Ray : Newsgroups : povray.general : #IF question using a substring : #IF question using a substring Server Time
7 Aug 2024 23:23:52 EDT (-0400)
  #IF question using a substring  
From: Patrick Dugan
Date: 9 May 2001 09:55:24
Message: <3af94c4c$1@news.povray.org>
I am trying to determine what the front of a string is and depending on what
that substring is declare certan values.

I am using the following code:

         #if (substr(MyStr,1,1)="0")
            #declare TL = -0.6;
            #declare TR = -0.4;
         #end;

Povray gives me an error on the #if line of:

numeric expression expected but substr found instead.

Is there anyway to get an #if statement to examine a substr for a value?  If
not how do you get around this?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.